package top.zt9.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author ztf
 * @Date 11:50 2021/11/22
 **/
@FeignClient(value = "sms-platform-cache")
@RequestMapping("/cache")
public interface CacheFeign {
    @RequestMapping(value = "/hmget/{key}", method = RequestMethod.GET)
    public Map hMGet(@PathVariable("key") String key);

    @RequestMapping(value = "/save2cache", method = RequestMethod.POST)
    public boolean set(@RequestParam("key") String key, @RequestParam("value") String value, @RequestParam("expireSecond") Long expireSecond);
}
